function func154(module, exports, __webpack_require__) {
    "use strict";
    (function(process) {
      Object.defineProperty(exports, "__esModule", {
        value: !0
      });
      var _toConsumableArray2 = __webpack_require__(159),
        _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2),
        _classCallCheck2 = __webpack_require__(17),
        _classCallCheck3 = _interopRequireDefault(_classCallCheck2),
        _createClass2 = __webpack_require__(18),
        _createClass3 = _interopRequireDefault(_createClass2),
        _possibleConstructorReturn2 = __webpack_require__(19),
        _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2),
        _inherits2 = __webpack_require__(20),
        _inherits3 = _interopRequireDefault(_inherits2),
        _regenerator = __webpack_require__(58),
        _regenerator2 = _interopRequireDefault(_regenerator),
        _asyncToGenerator2 = __webpack_require__(59),
        _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2),
        _react = __webpack_require__(0),
        _react2 = _interopRequireDefault(_react),
        _BlocklyOwn = __webpack_require__(164),
        _BlocklyOwn2 = _interopRequireDefault(_BlocklyOwn),
        _LANGUAGE = __webpack_require__(54),
        _LANGUAGE2 = _interopRequireDefault(_LANGUAGE),
        _modal = __webpack_require__(178),
        _modal2 = _interopRequireDefault(_modal),
        _message = __webpack_require__(85),
        _message2 = _interopRequireDefault(_message),
        _openModal = __webpack_require__(84),
        _tool = __webpack_require__(26),
        _request = __webpack_require__(206),
        _request2 = _interopRequireDefault(_request),
        _reactRedux = __webpack_require__(55);
  
      function _interopRequireDefault(e) {
        return e && e.__esModule ? e : {
          default: e
        }
      }
      __webpack_require__(210);
      var backImg = __webpack_require__(211),
        findWhyImg = __webpack_require__(212),
        helpImg = __webpack_require__(213),
        saveImg = __webpack_require__(214),
        listImg = __webpack_require__(215),
        blueToothImg = __webpack_require__(216),
        blueToothImgOk = __webpack_require__(217),
        getPosition = __webpack_require__(218),
        largeImg = __webpack_require__(219),
        narrowImg = __webpack_require__(220),
        playImg = __webpack_require__(221),
        stopPlayImg = __webpack_require__(222),
        deleteImg1 = __webpack_require__(223),
        deleteImg2 = __webpack_require__(224),
        help = __webpack_require__(225),
        icon_1 = __webpack_require__(226),
        icon_2 = __webpack_require__(227),
        icon_3 = __webpack_require__(228),
        icon_4 = __webpack_require__(229),
        icon_5 = __webpack_require__(230),
        icon_6 = __webpack_require__(231),
        icon_7 = __webpack_require__(232),
        icon_1c = __webpack_require__(233),
        icon_2c = __webpack_require__(234),
        icon_3c = __webpack_require__(235),
        icon_4c = __webpack_require__(236),
        icon_5c = __webpack_require__(237),
        icon_6c = __webpack_require__(238),
        icon_7c = __webpack_require__(239),
        path = __webpack_require__(240),
        apiPath = "api/api",
        _ref;
      // try {
      //   apiPath = "http://dapi.cocomiao.com/api"
      // } catch (e) {
      //   console.log("USEOSS--notReady")
      // }
  
      function mapStateToProps(e) {
        return {
          reduxData: e.activityReducer
        }
      }
  
      function clearTimeouts() {
        Object.keys(window.setTimeouts)
          .map((function(e) {
            clearTimeout(window.setTimeouts[e])
          })), window.waitSetInterval && clearInterval(window.waitSetInterval)
      }
  
      function clearCode(e) {
        var t = e && e.split("\n")
          .map((function(e) {
            return 0 == e.indexOf(",") ? "\n\n" : e
          })),
          o = "";
        if (!Array.isArray(t)  || t.length<1){
          return o;
        }
        return t.map((function(e) {
          return o += e + "\n"
        })), o
      }
      window.workspace = null, window.funcShouldRun = !1, window.lastBlock = null, window.setTimeouts = {}, window.toolItemName = "", window.variable = {}, window.stopJSandRobot = function() {}, 
      
      window.changeBlueLink = function() {}, window.leftBoxWidth = 0, window.userInfo = null, window.getUserInfoFn = function() {
        if (!window.webkit && !window.app) return '{"token":"5eeaf040f76673e3694c0816803e3a92","productId":"1307970870145835009","deviceType":1}';
        try {
          return window.callAppFun("getUserInfo")
        } catch (e) {
          return e
        }
      }, 
      
      window.savePgData = {
        id: "",
        name: ""
      }, 
      
      window.savePg = (_ref = (0, _asyncToGenerator3.default)(_regenerator2.default.mark((function e() {
        var t, o = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "",
          n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "asdasd";
        return _regenerator2.default.wrap((function(e) {
          e.stop()
          // for (;;) switch (e.prev = e.next) {
          //   case 0:
          //     if (userInfo.token) {
          //       e.next = 5;
          //       break
          //     }
          //     return _message2.default.error("" + _LANGUAGE2.default.TEXT_YKSFWFBCMSG[lang]), e.abrupt("return");
          //   case 5:
          //     return e.next = 7, (0, _request2.default)(apiPath + "/v1/robot/addOrUpdateModelProgram", {
          //       headers: {
          //         token: userInfo.token,
          //         productId: userInfo.productId,
          //         deviceType: userInfo.deviceType
          //       },
          //       aesEncryty: !1,
          //       apiKey: "123456",
          //       bizContent: {
          //         id: window.savePgData.id,
          //         modelId: userInfo.productId,
          //         name: o || window.savePgData.name,
          //         pic: "",
          //         programParam: n,
          //         type: userInfo.type
          //       },
          //       sign: "123456",
          //       timestamp: "123456"
          //     }, "POST");
          //   case 7:
          //     return t = e.sent, console.log(apiPath + "/v1/robot/addOrUpdateModelProgram", "apiPath+/v1/robot/addOrUpdateModelProgram"), console.log(userInfo.type, "userInfo.type"), console.log(t, "aaaaaaaaa"), t && 200 == t.errorCode && (window.savePgData = t.returnValue, _message2.default.success("" + _LANGUAGE2.default.TEXT_MSG1[lang])), e.abrupt("return", t);
          //   case 13:
          //   case "end":
          //     return e.stop()
          // }
        }), e, this)
      }))), function() {
        return _ref.apply(this, arguments)
      }), 
      window.getPgList = (0, _asyncToGenerator3.default)(_regenerator2.default.mark((function e() {
        var t;
        return _regenerator2.default.wrap((function(e) {
          e.stop()
          // for (;;) switch (e.prev = e.next) {
          //   case 0:
          //     if (userInfo.token) {
          //       e.next = 5;
          //       break
          //     }
          //     return _message2.default.error("" + _LANGUAGE2.default.TEXT_YKSFWFBCMSG[lang]), e.abrupt("return");
          //   case 5:
          //     return e.next = 7, (0, _request2.default)(apiPath + "/v1/robot/getModelProgramList", {
          //       headers: {
          //         token: userInfo.token,
          //         productId: userInfo.productId,
          //         deviceType: userInfo.deviceType
          //       },
          //       aesEncryty: !1,
          //       apiKey: "123456",
          //       bizContent: {
          //         id: "",
          //         modelId: "",
          //         name: "",
          //         pic: "",
          //         programParam: "",
          //         type: userInfo.type
          //       },
          //       sign: "123456",
          //       timestamp: "123456"
          //     }, "POST");
          //   case 7:
          //     return t = e.sent, e.abrupt("return", t);
          //   case 9:
          //   case "end":
          //     return e.stop()
          // }
        }), e, this)
      }))),
      
      window.callAppFun = function(e) {
        // var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {},
        //   o = (0, _tool.inIos)(),
        //   n = JSON.stringify(t);
        // console.log("调用APP注册的蓝牙发送方法>>>" + n);
        // try {
        //   if (o) return "getUserInfo" == e ? window.prompt(e) : window.webkit.messageHandlers[e].postMessage(n);
        //   if (!o) return window.app[e](n)
        // } catch (e) {
        //   console.log(e)
        // }
      },
      
      window.clearTimeouts = clearTimeouts;
      var lang = (0, _tool.getQueryVariable)("lang");
      lang || (lang = "cn"), window.pageType = (0, _tool.getQueryVariable)("pageType"), window.pageType || (window.pageType = "formal");
      var NoContent = function(_Component) {
        function NoContent(props, context) {
          var _this3 = this;
          (0, _classCallCheck3.default)(this, NoContent);
          var _this2 = (0, _possibleConstructorReturn3.default)(this, (NoContent.__proto__ || Object.getPrototypeOf(NoContent))
              .call(this, props, context)),
            _ref5;
          _this2.registerButtonCallback = function() {
            window.workspace.registerButtonCallback("CREATE_VARIABLE", (function(e) {
              (0, _openModal.openModal)({
                withOutBlock: !0,
                setValueFns: {
                  setValueFn: function(e) {
                    return e
                  },
                  getValueFn: function() {
                    var e = "";
                    if (window.vars) {
                      var t = Object.keys(window.vars);
                      t.length > 0 && (e = "变量" + (t.length + 1))
                    }
                    return e
                  }
                },
                callback: {
                  okFn: function(e) {
                    _this2.addWindowVars(e)
                  }
                },
                type: "SET_VAR"
              })
            }))
          }, _this2.addWindowVars = function(e) {
            if (window.vars[e]) return _message2.default.error("" + _LANGUAGE2.default.TEXT_MSG2[lang]), "";
            _this2.addBlocksIntoToolbox("变量", '<block type="variable_own" id="variable_own' + e + '" >\n<field name="VARNAME">' + e + '</field>\n<field name="VARVAL">0</field>\n</block>'), window.vars[e] = {
              val: "0",
              blockIds: [],
              dropDownBlockIds: []
            }
          }, _this2.myUpdateFunction = function(event) {
            //debugger
            var blockId = event.blockId,
              block = blockId ? workspace.getBlockById(blockId) : null,
              code = (_BlocklyOwn2.default.JavaScript.workspaceToCode(workspace));
              code = clearCode(code), _this2.writeScriptToDom(code), eval(code), _this2.getPlayFn(code), _this2.hiddenToolBoxFlyout(workspace), 
          "create" == event.type && ( block && (_BlocklyOwn2.default.bindEventWithChecks_(block.svgGroup_, "mousemove", null, (function(e) {
              var t = !1;
              e.clientX < window.leftBoxWidth && (t = !0), _this2.setState({
                showTrashCan: !0,
                openTrashCan: t
              })
            })), _BlocklyOwn2.default.bindEventWithChecks_(block.svgGroup_, "mouseup", null, (function(e) {
              _this2.setState({
                showTrashCan: !1,
                openTrashCan: !1
              })
            })))), 
          "move" == event.type && (window.shouldOpenModal = !1, block && (_BlocklyOwn2.default.bindEventWithChecks_(block.svgGroup_, "mousemove", null, (function(e) {
              var t = !1;
              e.clientX < window.leftBoxWidth && (t = !0), _this2.setState({
                showTrashCan: !0,
                openTrashCan: t
              })
            })), _BlocklyOwn2.default.bindEventWithChecks_(block.svgGroup_, "mouseup", null, (function(e) {
              _this2.setState({
                showTrashCan: !1,
                openTrashCan: !1
              })
            })))), 
          "endDrag" == event.type && event.isOutside && (_this2.deleteBlock({
              block: block
            }), console.log("删除")), "delete" != event.type || console.log("delete")
          },
           _this2.getPlayFn = function(code) {
            var codeArr = code.split("\n\n"),
              codeStr = "";
            codeArr.map((function(e) {
              e.indexOf("event_whenflagclicked()") > -1 && (codeStr = e)
            }));
            var runcodeArr = codeStr.replace(/\/\//g, "")
              .replace(/\;/g, "")
              .trim()
              .split("\n")
              .filter((function(e) {
                return 0 != e.indexOf(",")
              })),
              runFnStr = null;
            runcodeArr.map((function(e, t) {
              runFnStr = 0 == t ? e : "window.a = " + runFnStr + ".then((result)=>{\nreturn window." + e + "\n}).catch(function (reason) {\nconsole.log('失败：' + reason);\n})"
            })), 
            //console.log(code, "code"), console.log(runcodeArr, "runcodeArr"), console.log(runFnStr, "runFnStr"), 
            window.playFn = function() {
              eval(runFnStr)
            }
          },
           _this2.deleteBlock = function(e) {
            var t = e.blockId,
              o = void 0 === t ? "" : t,
              n = e.block,
              i = void 0 === n ? null : n;
            _BlocklyOwn2.default.Events.fire(new _BlocklyOwn2.default.Events.BlockDelete(i));
            var a = document.getElementById("deleteMp3");
            if (i) i.dispose();
            else if (o) {
              workspace.getBlockById(o)
                .dispose()
            }
            a.play()
          },
           _this2.addBlocksByXml = function(e) {
            var t = _BlocklyOwn2.default.Xml.textToDom(e);
            console.log(t,'11111111-------')
            return _BlocklyOwn2.default.Xml.domToWorkspace(t, workspace)
          }, 
       
          _this2.addBlockByType = function(e, t) {
            let xml = localStorage.getItem('workspaceXml');
            // var xml = window.setXmlLq(xml);
      
            var strStart = '<xml xmlns="http://www.w3.org/1999/xhtml">';
            var strEnd = '</xml>';
            var params = '<variables></variables>';
            var block = xml?xml.replace(strStart,'').replace(strEnd,'').replace(params,''):'';
            var o = block,
              n = _BlocklyOwn2.default.Xml.textToDom(o),
              i = _BlocklyOwn2.default.Xml.domToBlock(n, workspace);
            return workspace.centerOnBlock(i.id), i
          },
           _this2.addBlocksIntoToolbox = function(e, t) {
            var o = _this2.state.toolboxs,
              n = "",
              i = 0;
            o.map((function(t, o) {
              t.title == e && (n = t.xml, i = o)
            }));
            var a = n.split("</xml>")[0] + t + "</xml>",
              r = [].concat((0, _toConsumableArray3.default)(o));
            r[i].xml = a, _this2.setState({
              toolboxs: r
            }, (function() {
              //console.log(_this2.state.toolboxs[i].xml, "toolboxs"), console.log(r[i].xml, "toolboxs"), 
              workspace.updateToolbox(a)
            }))
          }, _this2.hiddenToolBoxFlyout = function(e) {
            e.deleteAreaToolbox_.width = 1e9, e.deleteAreaToolbox_.left = window.leftBoxWidth - 1e9, document.getElementsByClassName("blocklyFlyout")[0].setAttribute("width", 0)
          }, _this2.isToolBoxShow = function() {
            return 0 != Number(document.getElementsByClassName("blocklyFlyout")[0].getAttribute("width"))
          }, _this2.highLigh = function() {
            window.lastBlock && _BlocklyOwn2.default.selected && _BlocklyOwn2.default.selected.id != lastBlock.id && workspace.glowBlock(lastBlock.id, !1), _BlocklyOwn2.default.selected && (window.lastBlock = _BlocklyOwn2.default.selected, workspace.glowBlock(_BlocklyOwn2.default.selected.id, !0))
          }, _this2.workspaceScale = function(e) {
            var t = workspace.scale;
            switch (Number(e)) {
              case 0:
                t -= .1;
                break;
              case 1:
                t = .6;
                break;
              case 2:
                t += .1
            }
            workspace.setScale(t)
          }, _this2.resetScale = function() {
            _this2.workspaceScale(1), workspace.centerOnBlock(workspace.topBlocks_[0].id)
          }, _this2.showToolbox = function(e, t) {
            // console.log("切换工具栏-toolItem");
            var o = toolItemName == e.title;
            toolItemName = e.title, _this2.setState({
              choseIndex: t
            }), _this2.isToolBoxShow() && o ? _this2.hiddenToolBoxFlyout(workspace) : (_BlocklyOwn2.default.VerticalFlyout.prototype.DEFAULT_WIDTH = e.width, workspace.updateToolbox(e.xml))
          }, _this2.funcPlay = function() {
            var e = _this2.state.blueLinkStatus;
            if (
              // console.log(window.pageType, "2222"), 
              !e && "test" != window.pageType) return _message2.default.error("" + _LANGUAGE2.default.TEXT_MSG3[lang]), void window.callAppFun("ShowBlueListFn");
            window.playFn && (window.funcShouldRun = !0, _this2.setState({
              isplay: !0
            }), window.playFn(), _message2.default.success("" + _LANGUAGE2.default.TEXT_MSG4[lang]))
          }, _this2.funcStop = function() {
            window.funcShouldRun = !1, window.isWaitingBlueStatus = !1, Object.keys(window.vars)
              .map((function(e) {
                window.vars[e].val = 0
              }));
            var e = window.getBlueStr("0x33,0x49,0xf0,0x80,0xf0,0x80,0xf0,0x80,0xf0,0x80,0xff,0xff,0xff,0xff,0x00,0xcc", [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], 14);
            window.callAppFun("blueSend", {
              blueStr: e
            }), _this2.setState({
              isplay: !1
            }), window.motorStrArr = ["0x33", "0x49", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0xff", "0x00", "0xcc"], _message2.default.error("" + _LANGUAGE2.default.TEXT_MSG5[lang]), clearTimeouts()
          },
          //保存

          window.toXml = function(key) {
            var xml = _BlocklyOwn2.default.Xml.workspaceToDom(_BlocklyOwn2.default.getMainWorkspace());
            var value  = Blockly.Xml.domToPrettyText(xml);

            //console.log(value,'toXml');
            if(key){
              return value;
            }
          },
      
           
          window.fromXml = function(input){
            var xml = Blockly.Xml.textToDom(input);
            _BlocklyOwn2.default.Xml.clearWorkspaceAndLoadFromXml(xml,_BlocklyOwn2.default.getMainWorkspace());
            // let xml = localStorage.getItem('workspaceXml');
              // var strStart = '<xml xmlns="http://www.w3.org/1999/xhtml">';
              // var strEnd = '</xml>';
              // var params = '<variables></variables>';
              // var block = xml.replace(strStart,'').replace(strEnd,'').replace(params,'');
              // var o = block,
              //   n = _BlocklyOwn2.default.Xml.textToDom(o),
              //   i = _BlocklyOwn2.default.Xml.domToBlock(n, workspace);
              // return workspace.centerOnBlock(i.id), i
              // return xml;
          },
          window.saveProgram = function() {
          //  _this2.saveProgram = function() {
            var e, t = _this2;
            t.saveXml('');
            // (0, _openModal.openModal)({
            //   withOutBlock: !0,
            //   callback: {
            //     okFn: (e = (0, _asyncToGenerator3.default)(_regenerator2.default.mark((function e(o) {
            //       console.log(_regenerator2,'_regenerator2');
            //       console.log(o,'_regenerator2');
            //       return _regenerator2.default.wrap((function(e) {
            //         for (;;) switch (e.prev = e.next) {
            //           case 0:
            //             "" == o ? _message2.default.error("" + _LANGUAGE2.default.TEXT_MSG6[lang]) : t.saveXml(o);
            //           case 1:
            //           case "end":
            //             return e.stop()
            //         }
            //       }), e, _this3)
            //     }))), function(t) {
            //       return e.apply(this, arguments)
            //     })
            //   },
            //   setValueFns: {
            //     getValueFn: function() {
            //       return window.savePgData.name
            //     }
            //   },
            //   type: "SAVE_PROJECT"
            // })
          }, 
          //保存xml
          _this2.saveXml = (_ref5 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark((function e(t) {
            var o;
            return _regenerator2.default.wrap((function(e) {
              for (;;) switch (e.prev = e.next) {
                case 0:
                  return o = _BlocklyOwn2.default.Xml.workspaceToDom(_BlocklyOwn2.default.getMainWorkspace()),
                   o = _BlocklyOwn2.default.Xml.domToPrettyText(o), 
                   //localStorage.setItem('workspaceXml', o),
                   //console.log(o, "xmlxmlxml"),
                   // e.next = 5, 
                    window.savePg(t, o, window.saveId);
                case 5:
                  _message2.default.success("" + _LANGUAGE2.default.TEXT_MSG7[lang]), _this2.getPgListFn();
                case 7:
                case "end":
                  return e.stop()
              }
            }), e, _this3)
          }))), function(e) {
            return _ref5.apply(this, arguments)
          }), window.dispatch = props.dispatch;
          var newLocal = '<xml id="toolbox-1" style="display: none">\n<block type="event_whenflagclicked" ></block>\n\n</xml>';
          return _this2.state = {
            pList: [],
            pData: {},
            showPlistBox: !1,
            toolboxs: [{
              title: "事件",
              titleText: _LANGUAGE2.default.TEXT_SJ[lang],
              type: 1,
              img: icon_1,
              imgc: icon_1c,
              width: 200,
              xml: newLocal
            }, {
              title: "运动",
              titleText: _LANGUAGE2.default.TEXT_YD[lang],
              type: 2,
              img: icon_2,
              imgc: icon_2c,
              width: 420,
              xml: '<xml id="toolbox-1" style="display: none">\n<block type="motor_stop" ></block>\n\n<block type="motor_run" >\n<value name="SPEED_OPTION">\n<shadow type="text">\n<field name="TEXT">10</field>\n</shadow>\n</value>\n</block>\n\n<block type="motor_run_time" >\n<value name="SPEED_OPTION">\n<shadow type="text">\n<field name="TEXT">50</field>\n</shadow>\n</value>\n<value name="TIME_INPUT">\n<shadow type="text">\n<field name="TEXT">1</field>\n</shadow>\n</value>\n</block>\n\n\n<block type="two_motor_run" >\n<value name="SPEED_OPTION">\n<shadow type="text">\n<field name="TEXT">50</field>\n</shadow>\n</value>\n</block>\n\n<block type="two_motor_run_time" >\n<value name="SPEED_OPTION">\n<shadow type="text">\n<field name="TEXT">50</field>\n</shadow>\n</value>\n<value name="TIME_INPUT">\n<shadow type="text">\n<field name="TEXT">1</field>\n</shadow>\n</value>\n</block>\n\n\n<block type="two_motor_run_s">\n<field name="INTERFACE_OPTION2">2</field>\n<value name="SPEED_OPTION">\n<shadow type="text">\n<field name="TEXT">50</field>\n</shadow>\n</value>\n</block>\n\n<block type="two_motor_run_time_s" >\n<field name="INTERFACE_OPTION2">2</field>\n<value name="SPEED_OPTION">\n<shadow type="text">\n<field name="TEXT">50</field>\n</shadow>\n</value>\n<value name="TIME_INPUT">\n<shadow type="text">\n<field name="TEXT">1</field>\n</shadow>\n</value>\n</block>\n\n\n<block type="two_motor_stop" ></block>\n\n\n</xml>'
            }, {
              title: "控制",
              titleText: _LANGUAGE2.default.TEXT_KZ[lang],
              type: 3,
              img: icon_3,
              imgc: icon_3c,
              width: 200,
              xml: '<xml id="toolbox-1" style="display: none">\n<block type="control_wait">\n<value name="TIME">\n<shadow type="text">\n<field name="TEXT" >1</field>\n</shadow>\n</value>\n</block>\n<block type="control_repeat">\n<value name="TIME">\n<shadow type="text">\n<field name="TEXT" >1</field>\n</shadow>\n</value>\n</block>\n<block type="control_repeat_forever"></block>\n</xml>'
            }, {
              title: "声光",
              titleText: _LANGUAGE2.default.TEXT_SG[lang],
              type: 6,
              img: icon_6,
              imgc: icon_6c,
              width: 200,
              xml: '<xml id="toolbox-1" style="display: none">\n<block type="lamp_choose" id="lamp_choose"></block>\n\n</xml>'
            }],
            showTrashCan: !1,
            openTrashCan: !1,
            isplay: !1,
            blueLinkStatus: !1
          }, _this2
        }
        var _ref7, _ref6;
        return (0, _inherits3.default)(NoContent, _Component), (0, _createClass3.default)(NoContent, [{
          key: "setLeftWidth",
          value: function() {
            window.leftBoxWidth = document.getElementsByClassName("leftBox")[0].offsetWidth, document.getElementsByClassName("leftBox")[1].style.width = window.leftBoxWidth + "px", document.getElementsByClassName("fullBox")[0].style.paddingLeft = window.leftBoxWidth + "px"
          }
        }, {
          key: "componentDidMount",
          value: (_ref6 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark((function e() {
            var t;
            return _regenerator2.default.wrap((function(e) {
              for (;;) switch (e.prev = e.next) {
                case 0:
                  if (this.setLeftWidth(), t = this, this.documentInto("blocklyDiv", this.creatDom()), this.init(), window.stopJSandRobot = this.funcStop, window.changeBlueLink = function(e) {
                    t.setState({
                      blueLinkStatus: e
                    })
                  }) 

                  this.getPgListFn();
                case 12:
                case "end":
                  return e.stop()
              }
            }), e, this)
          }))), function() {
            return _ref6.apply(this, arguments)
          })
        }, {
          key: "componentWillUnmount",
          value: function() {}
        }, {
          key: "getPgListFn",
          value: (_ref7 = (0, _asyncToGenerator3.default)(_regenerator2.default.mark((function e() {
            var t;
            return _regenerator2.default.wrap((function(e) {
              for (;;) switch (e.prev = e.next) {
                case 0:
                  return e.next = 2, window.getPgList();
                case 2:
                  t = e.sent, t && t.returnValue && this.setState({
                    pList: t.returnValue
                  });
                case 5:
                case "end":
                  return e.stop()
              }
            }), e, this)
          }))), function() {
            return _ref7.apply(this, arguments)
          })
        }, {
          key: "playHelpAnimate",
          value: function() {
            var e = this;
            // console.log(localStorage.getItem("firstInto"), "localStorage.getItem()"), 
            null == localStorage.getItem("firstInto") && (this.showHelp(), setTimeout((function() {
              e.setState({
                showHelp: !1
              }), localStorage.setItem("firstInto", "NO")
            }), 2e3))
          }
        }, {
          key: "getBackFn",
          value: function() {
            (0, _tool.inIos)();
            window.callAppFun("getBackFn")
          }
        }, {
          key: "documentInto",
          value: function(e, t) {
            document.getElementById(e)
              .innerHTML = t
          }
        }, {
          key: "creatDom",
          value: function() {
            return '\n<xml id="toolbox-1"  style="display: none">\n</xml>\n\n<xml id="toolbox-2" style="display: none">\n<category name="event" id="event" expanded="false" >\n<block type="event_whenflagclicked"></block>\n<block type="event_whenbtnpressed"></block>\n<block type="sound_sounds_menu"></block>\n</category>\n</xml>\n'
          }
        }, {
          key: "init",
          value: function() {
            var e = this,
              t = this;
            if (document.getElementById("blocklyArea")) {
              var o = document.getElementById("blocklyArea"),
                n = document.getElementById("blocklyDiv");
              workspace = _BlocklyOwn2.default.inject(n, {
                id: "firstWorkSpace",
                comments: !1,
                disable: !0,
                collapse: !0,
                media: "./media/",
                readOnly: !1,
                rtl: !1,
                scrollbars: !0,
                toolbox: document.getElementById("toolbox-1"),
                toolboxPosition: "start",
                horizontalLayout: !1,
                trashcan: !1,
                sounds: !0,
                zoom: {
                  controls: !1,
                  wheel: !0,
                  startScale: .6,
                  maxScale: 4,
                  minScale: .25,
                  scaleSpeed: 1.1
                },
                grid: {
                  spacing: 0,
                  length: 0,
                  colour: "#ccc",
                  snap: !0
                },
                colours: {
                  fieldShadow: "rgba(255, 255, 255, 0.3)",
                  dragShadowOpacity: .6
                }
              });
              var i = function() {
                var e = o,
                  i = 0,
                  a = 0;
                do {
                  i += e.offsetLeft, a += e.offsetTop, e = e.offsetParent
                } while (e);
                n.style.left = i + "px", n.style.top = a + "px", n.style.width = o.offsetWidth + "px", n.style.height = o.offsetHeight + "px", _BlocklyOwn2.default.svgResize(workspace), t.hiddenToolBoxFlyout(workspace)
              };
              window.Blockly = _BlocklyOwn2.default, window.workspace = workspace, window.addEventListener("resize", i, !1), i(), _BlocklyOwn2.default.svgResize(workspace), workspace.addChangeListener(this.myUpdateFunction), this.hiddenToolBoxFlyout(workspace), this.registerButtonCallback(), document.getElementsByClassName("blocklyWorkspace")[0].addEventListener("touchstart", (function() {
                e.isToolBoxShow() && e.hiddenToolBoxFlyout(workspace);
              }), !1)
              //var xml = localStorage.getItem('workspaceXml');
                // _BlocklyOwn2.default.Xml.domToWorkspace(_BlocklyOwn2.default.Xml.textToDom(xml), Blockly)
            }
          }
        }, {
          key: "writeScriptToDom",
          value: function(e) {
            var t = document.getElementById("scriptDom");
            t || ((t = document.createElement("script"))
              .type = "text/javascript", t.id = "scriptDom", document.body.appendChild(t)), t.innerHTML = e
          }
        }, {
          key: "changeByXmlData",
          value: function(e) {
            workspace.clear();
            var t = e.programParam;
            //console.log(t,'222222222-------');
            t = _BlocklyOwn2.default.Xml.textToDom(e.programParam), _BlocklyOwn2.default.Xml.domToWorkspace(workspace, t), window.savePgData = e, this.setState({
              pData: e,
              showPlistBox: !1
            }), _message2.default.success("" + _LANGUAGE2.default.TEXT_MSG8[lang])
          }
        }, {
          key: "testXmlData",
          value: function() {
            workspace.clear();
            //var xml = localStorage.getItem('workspaceXml');
            let e = _BlocklyOwn2.default.Xml.textToDom('<xml xmlns="http://www.w3.org/1999/xhtml">\n<variables></variables>\n<block type="event_whenflagclicked" id="dWY_m+b4gsomBT7BnM6" deletable="false" movable="false" editable="false" x="0" y="0">\n<field name="icon_img">./media/icons/event_whenflagclicked.svg</field>\n<next>\n<block type="motor_stop" id="eBcv5!.+Uu!KwTyBYxVq">\n<field name="icon_img">./media/block/sigle_motor.png</field>\n<field name="INTERFACE_OPTION">1</field>\n</block>\n</next>\n</block>\n</xml>');
            // console.log(e,'333333333----')
            _BlocklyOwn2.default.Xml.domToWorkspace(workspace, e)
          }
        }, {
          key: "isSaveFn",
          value: function(e) {
            var t, o = this;
            (0, _openModal.openModal)({
              withOutBlock: !0,
              callback: {
                okFn: (t = (0, _asyncToGenerator3.default)(_regenerator2.default.mark((function t(n) {
                  return _regenerator2.default.wrap((function(t) {
                    for (;;) switch (t.prev = t.next) {
                      case 0:
                        e();
                      case 1:
                      case "end":
                        return t.stop()
                    }
                  }), t, o)
                }))), function(e) {
                  return t.apply(this, arguments)
                }),
                noFn: function(t) {
                  e()
                }
              },
              type: "OK_NO_SAVE"
            })
          }
        }, {
          key: "showList",
          value: function() {
            this.setState({
              showPlistBox: !this.state.showPlistBox
            })
          }
        }, {
          key: "stopMp",
          value: function(e) {
            e.stopPropagation(), e.nativeEvent.stopImmediatePropagation()
          }
        }, {
          key: "showHelp",
          value: function() {
            this.setState({
              showHelp: !0
            })
          }
        }, {
          key: "render",
          value: function() {
            var e = this,
              t = (__webpack_require__(241), this.state),
              o = t.toolboxs,
              n = t.showHelp,
              i = t.showTrashCan,
              a = t.openTrashCan,
              r = t.isplay,
              l = t.choseIndex,
              s = t.blueLinkStatus,
              E = t.pList,
              O = t.showPlistBox;
            return _react2.default.createElement("div", {
              className: "fullBox paddingLeft80"
            }, _react2.default.createElement("div", {
              className: "helpBox",
              style: {
                opacity: n ? "1" : "0",
                visibility: n ? "visible" : "hidden"
              },
              onClick: function() {
                e.setState({
                  showHelp: !1
                })
              }
            }, _react2.default.createElement("img", {
              className: "hand",
              src: help,
              alt: ""
            })), _react2.default.createElement("div", {
              className: "leftBox shadowBox"
            },
            //  _react2.default.createElement("div", {
            //   className: "backBtn",
            //   onClick: this.getBackFn.bind(this)
            // },
            //  _react2.default.createElement("img", {
            //   src: backImg,
            //   alt: ""
            // })),
             _react2.default.createElement("div", {
              className: "toolBoxOwn"
            }, o.map((function(t, o) {
              return _react2.default.createElement("div", {
                className: "toolItem " + (l == o ? "beChose" + o + " beChose" : ""),
                onClick: e.showToolbox.bind(e, t, o),
                key: o
              }, _react2.default.createElement("img", {
                src: l == o ? t.imgc : t.img,
                alt: ""
              }), _react2.default.createElement("span", null, t.titleText))
            })))), _react2.default.createElement("div", {
              className: "leftBox",
              style: {
                visibility: i ? "visible" : "hidden",
                zIndex: "3",
                background: "rgba(255,255,255,0.8)",
                opacity: i ? "1" : "0",
                transition: "all 0.3s ease-in-out"
              }
            }, _react2.default.createElement("div", {
              className: "trashCanImgBox"
            }, _react2.default.createElement("img", {
              className: "img1 " + (a && "open"),
              src: deleteImg1,
              alt: ""
            }), _react2.default.createElement("img", {
              className: "img2",
              src: deleteImg2,
              alt: ""
            }))), _react2.default.createElement("div", {
              id: "blocklyArea",
              className: "fullBox"
            }, _react2.default.createElement("div", {
              id: "textarea"
            }), _react2.default.createElement("div", {
              id: "blocklyDiv",
              style: {
                position: "absolute"
              }
            })), _react2.default.createElement("div", {
              style: {
                pointerEvents: r ? "none" : "all"
              }
            }, _react2.default.createElement("div", {
              className: "topBtnsBox"
            },
            //  _react2.default.createElement("img", {
            //   className: "topBtn",
            //   src: helpImg,
            //   alt: "",
            //   onClick: function() {
            //     window.callAppFun("help")
            //   }
            // }),
            //  _react2.default.createElement("img", {
            //   className: "topBtn",
            //   src: saveImg,
            //   alt: "",
            //   onClick: this.saveProgram
            // }),
            //  _react2.default.createElement("img", {
            //   className: "topBtn",
            //   src: listImg,
            //   alt: "",
            //   onClick: this.showList.bind(this)
            // }), _react2.default.createElement("img", {
            //   className: "topBtn",
            //   src: s ? blueToothImgOk : blueToothImg,
            //   alt: "",
            //   onClick: function() {
            //     window.callAppFun("ShowBlueListFn")
            //   }
            // })
            ),
             _react2.default.createElement("div", {
              className: "pFullBox",
              style: {
                display: O ? "block" : "none"
              },
              onClick: function() {
                e.setState({
                  showPlistBox: !1
                })
              }
            }, _react2.default.createElement("div", {
              className: "pListBox",
              style: {
                display: O ? "block" : "none"
              },
              onClick: this.stopMp.bind(this)
            }, E && E.map((function(t, o) {
              return _react2.default.createElement("div", {
                key: o,
                className: "pListItem",
                onClick: e.changeByXmlData.bind(e, t)
              }, t.name ? t.name : t.id)
            })))), _react2.default.createElement("div", {
              className: "rightBtnsBox"
            }, _react2.default.createElement("img", {
              className: "rightBtn",
              src: getPosition,
              alt: "",
              onClick: this.resetScale.bind(this, 2)
            }), _react2.default.createElement("img", {
              className: "rightBtn",
              src: largeImg,
              alt: "",
              onClick: this.workspaceScale.bind(this, 2)
            }), _react2.default.createElement("img", {
              className: "rightBtn",
              src: narrowImg,
              alt: "",
              onClick: this.workspaceScale.bind(this, 0)
            }))),
            //  _react2.default.createElement("img", {
            //   className: "playBtn",
            //   src: r ? stopPlayImg : playImg,
            //   alt: "",
            //   onClick: r ? this.funcStop : this.funcPlay.bind(this)
            // }),
             _react2.default.createElement("div", {
              className: "cantClick",
              style: {
                display: r ? "block" : "none"
              }
            }), _react2.default.createElement("div", {
              id: "importBox",
              style: {
                display: "none"
              }
            }), _react2.default.createElement(_modal2.default, null), _react2.default.createElement("audio", {
              id: "deleteMp3",
              src: __webpack_require__(242),
              autoPlay: "autoplay",
              controls: "controls",
              style: {
                display: "none"
              }
            }))
          }
        }]), NoContent
      }(_react.Component);
      exports.default = (0, _reactRedux.connect)(mapStateToProps)(NoContent)
    })
    .call(this, __webpack_require__(82))
  }